package com.catmiw.mp3;

public class Frame {
	private Header header;
	public Header getHeader() {
		return header;
	}

	public void setHeader(Header header) {
		this.header = header;
	}

	public byte[] getMaindata() {
		return maindata;
	}

	public void setMaindata(byte[] maindata) {
		this.maindata = maindata;
	}

	private byte[] maindata;
	
	public Frame(Header header,byte[] maindata){
		this.header=header;
		this.maindata=maindata;
	}
	
	public byte[] toByteArray(){
		byte[] temp=new byte[header.getHeaddata().length+maindata.length];
		System.arraycopy(header.getHeaddata(), 0, temp, 0, header.getHeaddata().length);
		System.arraycopy(maindata, 0, temp, header.getHeaddata().length, maindata.length);
		
		return temp;
	}
	
}
